package com.web.listenter;

import javax.servlet.ServletContextAttributeEvent;
import javax.servlet.ServletContextAttributeListener;
import javax.servlet.annotation.WebListener;

import com.alibaba.fastjson.JSONArray;

/**
 * Application Lifecycle Listener implementation class AppListenter
 *
 */
@WebListener
public class AppListenter implements ServletContextAttributeListener {

    public void attributeAdded(ServletContextAttributeEvent scae)  { 
         System.out.println("attributeAdded-->"+scae.getName()+":"+JSONArray.toJSONString(scae.getValue()));
    }

    public void attributeRemoved(ServletContextAttributeEvent scae)  { 
        System.out.println("attributeRemoved-->"+scae.getName()+":"+JSONArray.toJSONString(scae.getValue()));
    }

    public void attributeReplaced(ServletContextAttributeEvent scae)  { 
        System.out.println("attributeReplaced-->"+scae.getName()+":"+JSONArray.toJSONString(scae.getValue()));
    }

}
